package com.qingcloud.adminbackend.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qingcloud.adminbackend.entity.aline.SysSensorAline;
import com.qingcloud.adminbackend.entity.aline.AlinePageDTO;
import com.qingcloud.adminbackend.entity.aline.AlinePageVO;
import com.qingcloud.adminbackend.mapper.SysSensorAlineMapper;
import com.qingcloud.adminbackend.service.ISysSensorAlineService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 传感器数据校准表(网格化设备) 服务实现类
 * </p>
 *
 * @author liuziyong
 * @since 2019-04-12
 */
@Service
public class SysSensorAlineServiceImpl extends ServiceImpl<SysSensorAlineMapper, SysSensorAline> implements ISysSensorAlineService {

    @Resource
    private SysSensorAlineMapper sysSensorAlineMapper;

    @Override
    public IPage<AlinePageVO> page(AlinePageDTO alinePageDTO) {
        Page<AlinePageDTO> page = new Page<>(alinePageDTO.getCurrentPage(), alinePageDTO.getPerPage());
        return sysSensorAlineMapper.findPage(page, alinePageDTO);
    }
}
